home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / rexx / scandirs.idesk < prev    next >
Text File  |  1995-06-11  |  960b  |  46 lines

  1. /* Recursively scans directories and generates thumbnails objects
  2.    for ImageDesk (doesn't save catalogs).
  3.  
  4.       From Michael Schaffner.
  5.  
  6.    Thanks Michael!
  7.                                  */
  8.  
  9. OPTIONS RESULTS
  10.  
  11. if( ADDRESS() ~= "IDESK_REXXPORT" ) then
  12.     ADDRESS IDESK_REXXPORT
  13.  
  14. /*  PARSE ARG ROOT */
  15.  
  16.   IDGETPATH '"Zu durchsuchender Pfad : "'
  17.   ROOT = result
  18.  
  19.   if (RIGHT(ROOT,1) ~== ':') & (RIGHT(ROOT,1) ~== '/')
  20.   then ROOT = ROOT||'/'
  21.  
  22.   if ~show('L', "rexxsupport.library")
  23.   then do
  24.     if ~addlib('rexxsupport.library', 0, -30)
  25.     then
  26.       say "Added rexxsupport.library"
  27.     else do
  28.       say "Rexxsupport.library not available, exiting..."
  29.       exit 10
  30.     end
  31.   end
  32.  
  33.   GENTHUMBNAILS ROOT
  34.   CALL SCANDIR(ROOT)
  35.  
  36.   EXIT
  37.  
  38.   SCANDIR: PROCEDURE
  39.   PARSE ARG AKTDIR
  40.   DIRFILES = ShowDir(AKTDIR,DIR)
  41.   DO I = 1 TO WORDS(DIRFILES)
  42.     GENTHUMBNAILS '"'||AKTDIR||WORD(DIRFILES,I)||'"'
  43.     DUMMY = SCANDIR(AKTDIR||WORD(DIRFILES,I)||'/')
  44.   END
  45.   RETURN 0
  46.